package com.example.demo.dongao.service;

import com.example.demo.dongao.entity.Lawyer;
import com.example.demo.dongao.mapper.LawyerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Service
public class LawyerServiceimpl implements LawyerService{
    @Autowired
    LawyerMapper lawyerMapper;


    @Override
    public int removeLawyer(int lawyerid) {
        return lawyerMapper.deleteLawyer(lawyerid);
    }
    @Override
    public List<Lawyer> findLawyer(){
        return lawyerMapper.selectLawyer();
    }

    @Override
    /**
     * 添加律师
     * @param lawyer
     * @return 成功返回1
     */
    @Override
    public int addLawyer(Lawyer lawyer)
    {
       return  LawyerService.insertLawyer(lawyer);
    }
}
